package org.zoomdev.zoom.dao;

import org.zoomdev.zoom.dao.adapters.ResultSetAdapter;
import org.zoomdev.zoom.dao.adapters.StatementAdapter;
import org.zoomdev.zoom.dao.structs.ColumnMeta;

import java.lang.reflect.Type;

public abstract class EntityField {

    protected String fieldName;
    protected Type fieldType;
    protected String columnName;
    protected StatementAdapter statementAdapter;
    protected ResultSetAdapter resultSetAdapter;
    protected ColumnMeta column;

    public EntityField() {
    }

    public Type getFieldType() {
        return fieldType;
    }

    public void setFieldType(Type fieldType) {
        this.fieldType = fieldType;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public StatementAdapter getStatementAdapter() {
        return statementAdapter;
    }

    public void setStatementAdapter(StatementAdapter statementAdapter) {
        this.statementAdapter = statementAdapter;
    }

    public ResultSetAdapter getResultSetAdapter() {
        return resultSetAdapter;
    }

    public void setResultSetAdapter(ResultSetAdapter resultSetAdapter) {
        this.resultSetAdapter = resultSetAdapter;
    }

    public ColumnMeta getColumn() {
        return column;
    }

    public void setColumn(ColumnMeta column) {
        this.column = column;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public abstract Object get(Object target);

    public abstract void set(Object target, Object value);


}
